# locust777

////深度递归
//#include<stdio.h>
//int Fun(int n)
//{
//if(n == 5)
//	return 2;
//else
//	return 2 * Fun(n + 1);
//}
//int main()
//{
//int ret = Fun(2);
//printf("%d\n",ret);
//return 0;
//scanf("%d",ret);
////}
//



////字符串逆序1 （递归实现）
//#include<stdio.h>
//int main()
//{
//char arr[] = "abcdef";
//int sz = sizeof(arr)/sizeof(arr[0]);
//int left = 0;
//int right = sz - 2;
//while(left<right)
//{
//char tmp = arr[left];
//arr[right] = arr[right];
//arr[right] = tmp;
//left++;
//right--;
//}
//scanf("%d",arr);
//return 0;
//}


//
////字符串逆序（递归实现）//存在错误，后期重新调整
//#include<stdio.h>
//#include<windows.h>
//int my_strlen(char* str)
//{
//int count = 0;
//while(*str != '\0')
//{
//count++;
//str++;
//}
//return count;
//}
//

//void reverse(char* str)
//{
//char tmp = *str;
////int len = strlen(str);
////*str = *(str + len - 1);
////*(str+len-1)= '\0';
////if(strlen(str+1) >= 2)
////	reverse(str+1);
////*(str + len -1)= tmp;
////}
//
////
////int main()
////{
////	char arr[]="abcdef";
////	reverse(arr);
////	printf("%d\n",arr);
////	scanf("%d",arr);
////
////return 0;
////}
//
//
//
////字符串逆序3
//void reverse(char arr[],int left,int right)//系统冲突
//{
//char tmp = arr[left];
//arr[left] = arr[right];
//arr[right] = tmp;
//reverse(arr,left+1,right-1);
//}
//
//
//int my_strlen(char* str)
//{
//int count = 0;
//while(*str != '\0')
//{
//count++;
//str++;
//}
//return count;
//}
//
//
//#include<stdio.h>
//int main()
//{
//char arr[] = "abcdef";//[a b c d e f \0]
//int left = 0;
//int right = my_strlen(arr)-1;
//reverse(arr,left,right);
//printf("%d\n",arr);
//return 0;
//}


////计算每位数之和
//int DigitSum(unsigned int n)
//{
//if(n > 9)
//	return DigitSum(n / 10)+n % 10;
//else
//	return n;
//}
//
//
//#include<stdio.h>
//int main()
//{
//unsigned int n = 0;
//scanf("%u",&n);
//printf("%d\n",DigitSum(n));
//return 0;
//}




////k = 0,1
////k>0,Pow(n,k)->n*Pow(n,k-1)
////k<0,1/(Pow(n,-k))
//double Pow(int n,int k)//不清楚，后期重新理解
//{
//if(k>0)
//	return n * Pow(n,k - 1);
//else if(k == 0)
//	return 1;
//else
//	return 1.0/Pow(n,-k);
//}
//
//
//#include<stdio.h>
//int main()
//{
//int n = 0;
//int k = 0;
//scanf("%d%d",&n,&k);
//printf("%d\n",Pow(n,k));
//scanf("%d%d",&n,&k);
//
//}

